Skip to content

feat: refactor all regular expressions into super-expressive #63

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from

Conversation

carafelix
Copy link
Member

closes #61

besides the obvious port, some extra changes were made

  • add --hide-stacktraces to deno task run for debloating the test runner

notes:

`${escapedPrefix}(?<command>[^@ ]+)(?:@(?<username>[^\\s]*))?(?<rest>.*)`,

  • [^\s] was changed to \S, since its the same thing
  • why it uses * instead of + if the groups are already optional?

todo: add perf stress test comparing to main

const ctx = getDummyCtx({ userInput: "/start" });
const m = ctx.message!;

it("Assert new implamantation is not more than 10% slower", () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it("Assert new implamantation is not more than 10% slower", () => {
it("Assert new implementation is not more than 10% slower", () => {

@carafelix
Copy link
Member Author

too much impact on performance, at least with the implementation I came with

@carafelix carafelix closed this Mar 28, 2025
@roziscoding roziscoding deleted the add-super-expressive branch March 28, 2025 11:16
@carafelix carafelix restored the add-super-expressive branch March 28, 2025 13:33
@carafelix
Copy link
Member Author

carafelix commented Mar 28, 2025

@roziscoding I would like to have the branch around some time, if you don't mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor regexes with super-expressive
2 participants